package com.wwtech.epp.ui.activity.work.module;

import com.wwtech.epp.data.api.HttpAPIWrapper;
import com.wwtech.epp.ui.activity.base.ActivityScope;
import com.wwtech.epp.ui.activity.work.ApproveCenterActivity;
import com.wwtech.epp.ui.activity.work.contract.ApproveCenterContract;
import com.wwtech.epp.ui.activity.work.presenter.ApproveCenterPresenter;

import dagger.Module;
import dagger.Provides;

/**
 * @author hzp
 * @Package com.wwtech.epp.ui.activity.work
 * @Description: The moduele of ApproveCenterActivity, provide field for ApproveCenterActivity
 * @date 2017/09/16 15:40:59
 */
@Module
public class ApproveCenterModule {
    private final ApproveCenterContract.View mView;


    public ApproveCenterModule(ApproveCenterContract.View view) {
        this.mView = view;
    }

    @Provides
    @ActivityScope
    public ApproveCenterPresenter provideApproveCenterPresenter(HttpAPIWrapper httpAPIWrapper, ApproveCenterActivity mActivity) {
        return new ApproveCenterPresenter(httpAPIWrapper, mView, mActivity);
    }

    @Provides
    @ActivityScope
    public ApproveCenterActivity provideApproveCenterActivity() {
        return (ApproveCenterActivity) mView;
    }
}